using System;
using System.Collections.Generic;
using System.Text;
namespace Decision.BusinessLayer
{
    [Serializable]
	public class ECT_USER
	{

		#region InnerClass
		public enum ECT_USERFields
		{
			USER_ID,
			USERNAME,
			PASSWORD,
			IS_ACTIVE,
			FNAME,
			LNAME,
			TEL_NO,
			DATE_OF_BIRTH,
			ADDRESS,
			SEX,
			USER_GROUP_ID,
			PROVINCE_ID,
			USER_GROUP_LVL
		}
		#endregion

		#region Data Members

			int _uSER_ID;
			string _uSERNAME;
			string _pASSWORD;
			bool? _iS_ACTIVE;
			string _fNAME;
			string _lNAME;
			string _tEL_NO;
			DateTime? _dATE_OF_BIRTH;
			string _aDDRESS;
			int? _sEX;
			int? _uSER_GROUP_ID;
			int? _pROVINCE_ID;
			int? _uSER_GROUP_LVL;

		#endregion

		#region Properties

		public int  USER_ID
		{
			 get { return _uSER_ID; }
			 set
			 {
				 if (_uSER_ID != value)
				 {
					_uSER_ID = value;
					 PropertyHasChanged("USER_ID");
				 }
			 }
		}

		public string  USERNAME
		{
			 get { return _uSERNAME; }
			 set
			 {
				 if (_uSERNAME != value)
				 {
					_uSERNAME = value;
					 PropertyHasChanged("USERNAME");
				 }
			 }
		}

		public string  PASSWORD
		{
			 get { return _pASSWORD; }
			 set
			 {
				 if (_pASSWORD != value)
				 {
					_pASSWORD = value;
					 PropertyHasChanged("PASSWORD");
				 }
			 }
		}

		public bool?  IS_ACTIVE
		{
			 get { return _iS_ACTIVE; }
			 set
			 {
				 if (_iS_ACTIVE != value)
				 {
					_iS_ACTIVE = value;
					 PropertyHasChanged("IS_ACTIVE");
				 }
			 }
		}

		public string  FNAME
		{
			 get { return _fNAME; }
			 set
			 {
				 if (_fNAME != value)
				 {
					_fNAME = value;
					 PropertyHasChanged("FNAME");
				 }
			 }
		}

		public string  LNAME
		{
			 get { return _lNAME; }
			 set
			 {
				 if (_lNAME != value)
				 {
					_lNAME = value;
					 PropertyHasChanged("LNAME");
				 }
			 }
		}

		public string  TEL_NO
		{
			 get { return _tEL_NO; }
			 set
			 {
				 if (_tEL_NO != value)
				 {
					_tEL_NO = value;
					 PropertyHasChanged("TEL_NO");
				 }
			 }
		}

		public DateTime?  DATE_OF_BIRTH
		{
			 get { return _dATE_OF_BIRTH; }
			 set
			 {
				 if (_dATE_OF_BIRTH != value)
				 {
					_dATE_OF_BIRTH = value;
					 PropertyHasChanged("DATE_OF_BIRTH");
				 }
			 }
		}

		public string  ADDRESS
		{
			 get { return _aDDRESS; }
			 set
			 {
				 if (_aDDRESS != value)
				 {
					_aDDRESS = value;
					 PropertyHasChanged("ADDRESS");
				 }
			 }
		}

		public int?  SEX
		{
			 get { return _sEX; }
			 set
			 {
				 if (_sEX != value)
				 {
					_sEX = value;
					 PropertyHasChanged("SEX");
				 }
			 }
		}

		public int?  USER_GROUP_ID
		{
			 get { return _uSER_GROUP_ID; }
			 set
			 {
				 if (_uSER_GROUP_ID != value)
				 {
					_uSER_GROUP_ID = value;
					 PropertyHasChanged("USER_GROUP_ID");
				 }
			 }
		}

		public int?  PROVINCE_ID
		{
			 get { return _pROVINCE_ID; }
			 set
			 {
				 if (_pROVINCE_ID != value)
				 {
					_pROVINCE_ID = value;
					 PropertyHasChanged("PROVINCE_ID");
				 }
			 }
		}

		public int?  USER_GROUP_LVL
		{
			 get { return _uSER_GROUP_LVL; }
			 set
			 {
				 if (_uSER_GROUP_LVL != value)
				 {
					_uSER_GROUP_LVL = value;
					 PropertyHasChanged("USER_GROUP_LVL");
				 }
			 }
		}


		#endregion

		#region not support PropertyChangeEvent

		protected virtual void PropertyHasChanged(string propertyName)
		{
			return;
		}

		#endregion
/********** not support Validation
		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("USER_ID", "USER_ID"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("USERNAME", "USERNAME"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("USERNAME", "USERNAME",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("PASSWORD", "PASSWORD",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("FNAME", "FNAME",255));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("LNAME", "LNAME",255));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("TEL_NO", "TEL_NO",10));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("ADDRESS", "ADDRESS",2147483647));
		}

		#endregion
********/

	}
}
